﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<body>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="form-search">
                            <form role="form" class="form-inline clearfix" id="form2" action="">
                            <#if sessionAdmin.phone == 'admin'>
                                <div class="input-group col-xs-3">
                                    <span class="input-group-addon">用户名</span>
                                    <input type="text" class="form-control" name="name" value="${name!}">
                                </div>
                                <div class="input-group col-xs-3">
                                    <span class="input-group-addon">手机号</span>
                                    <input type="text" class="form-control" name="phone" value="${phone!}">
                                </div>
                            </#if>
                                <div class="input-group col-xs-3">
                                    <span class="input-group-addon">套餐</span>
                                    <input type="text" class="form-control" name="tcname" value="${tcname!}">
                                </div>

                                <div class="input-group col-xs-3">
                                    <span class="input-group-addon">开始时间</span>
                                    <input type="text" class="form-control date-picker" data-date-format="yyyy-mm" name="starttime" value="${starttime!}">
                                </div>

                                <div class="input-group col-xs-3">
                                    <span class="input-group-addon">结束时间</span>
                                    <input type="text" class="form-control date-picker" data-date-format="yyyy-mm" name="endtime" value="${endtime!}">
                                </div>

                            </form>
                            <div class="form-tool btn-group">
                                <button class="btn btn-sm btn-success" form="form2">
                                    <i class="icon-search"></i>搜索
                                </button>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>用户名</th>
                                    <th>手机号</th>
                                    <th>套餐</th>
                                    <th>套餐金额</th>
                                    <th>更换时间</th>
                                </tr>
                                </thead>
                                <tbody>
                                <#list pageInfo.list as item>
                                <tr>
                                    <td>${item.name!}</td>
                                    <td>${item.phone!}</td>
                                    <td>${item.tcname!}</td>
                                    <td>${item.money!}</td>
                                    <td>${item.addtime?string('yyyy-MM-dd HH:mm:ss')}</td>
                                </tr>
                                </#list>
                                </tbody>
                            </table>
                        <#include "../include/table-page.ftl"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

<div class="modal fade" tabindex="-1" role="dialog" id="model">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">发送消息</h4>
            </div>
            <form action="/message/add" method="post">
                <div class="modal-body">
                    <input type="hidden" name="userid" id="id">
                    <div class="form-group">
                        <input class="form-control" name="content" type="text">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <input type="submit" class="btn btn-primary">
                </div>
            </form>
        </div>
    </div>
</div>

<#include "../include/resource-script.ftl"/>
<script>
    function update(id) {
        $("#id").val(id);
        $("#model").modal("show");
    }

</script>
</html>

